home *** CD-ROM | disk | FTP | other *** search
/ CD/PC Actual 76 / DVD Actual 1 Marzo 2003.iso / Trial / TurboCAD 7.1 Pro / Data.Cab / F24343_AddProperty.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2000-11-10  |  1.3 KB  |  64 lines

  1. // AddProperty.cpp : implementation file
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "LTSample.h"
  6. #include "AddProperty.h"
  7.  
  8. #ifdef _DEBUG
  9. #define new DEBUG_NEW
  10. #undef THIS_FILE
  11. static char THIS_FILE[] = __FILE__;
  12. #endif
  13.  
  14. /////////////////////////////////////////////////////////////////////////////
  15. // CAddProperty dialog
  16.  
  17.  
  18. CAddProperty::CAddProperty(CWnd* pParent /*=NULL*/)
  19.     : CDialog(CAddProperty::IDD, pParent)
  20. {
  21.     //{{AFX_DATA_INIT(CAddProperty)
  22.     m_cstrName = _T("");
  23.     m_cstrType = _T("");
  24.     m_bReadOnly = FALSE;
  25.     //}}AFX_DATA_INIT
  26. }
  27.  
  28.  
  29. void CAddProperty::DoDataExchange(CDataExchange* pDX)
  30. {
  31.     CDialog::DoDataExchange(pDX);
  32.     //{{AFX_DATA_MAP(CAddProperty)
  33.     DDX_Text(pDX, IDC_NAME, m_cstrName);
  34.     DDX_CBString(pDX, IDC_PROPERTYPE, m_cstrType);
  35.     DDX_Check(pDX, IDC_READONLY, m_bReadOnly);
  36.     //}}AFX_DATA_MAP
  37. }
  38.  
  39.  
  40. BEGIN_MESSAGE_MAP(CAddProperty, CDialog)
  41.     //{{AFX_MSG_MAP(CAddProperty)
  42.     //}}AFX_MSG_MAP
  43. END_MESSAGE_MAP()
  44.  
  45. /////////////////////////////////////////////////////////////////////////////
  46. // CAddProperty message handlers
  47.  
  48. void CAddProperty::OnOK() 
  49. {
  50.     UpdateData();
  51.     if (m_cstrName.IsEmpty())
  52.     {
  53.         AfxMessageBox(IDS_PROPERTYNAMEISNEED);
  54.         return;
  55.     }
  56.     if (m_cstrType.IsEmpty())
  57.     {
  58.         AfxMessageBox(IDS_PROPERTYTYPEISNEED);
  59.         return;
  60.     }
  61.     
  62.     CDialog::OnOK();
  63. }
  64.